﻿using UnityEngine;
using System.Collections;
using System.Runtime.Hosting;
using Mono.Data;
using Mono.Data.Sqlite;
 
public class GameLoad :MonoBehaviour
{
	/// <summary>
    /// SQLite数据库辅助类
    /// </summary>
    private SQLiteHelper sql;
    private SqliteDataReader ItemReader; 
 	protected static GameLoad instance;
    public static GameLoad Instance
    {
        get
        {
            if (instance == null)
            {
                instance = (GameLoad)FindObjectOfType(typeof(GameLoad));
            }
 
            return instance;
        }
    }

    // [RuntimeInitializeOnLoadMethod]
    // public static void Initialize()
    // {
    	//GameObject.DontDestroyOnLoad(instance);
		// GameObject.DontDestroyOnLoad(new GameObject("GameLoad",typeof(GameLoad)) {
		// 	hideFlags = HideFlags.HideInHierarchy//在编辑器层级面板中隐藏
		// });
		// Debug.Log( "开始初始化数据" );

		// string appDBPath = Application.dataPath  + "/braves.db";
		// instance.sql = new SQLiteHelper(@"Data Source=" + appDBPath);

    //}
}